<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="{{ url_for('admin.static', filename='images/favicon.ico')}}">

        <title>{% block title %}藕丝空间 {% endblock %}</title>
        {% block css %}
            <!-- 新 Bootstrap 核心 CSS 文件 -->
            <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

            <!-- 可选的Bootstrap主题文件（一般不用引入） -->
            <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

            <link href="{{ url_for('admin.static', filename='css/login.css')}}" rel="stylesheet">

        {% endblock %}

        {% block js %}
            <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
            <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

            <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
            <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

        {% endblock %}
    </head>

    <body>
        <div class="container">
            <div class="col-xs-12 col-sm-offset-3">
                <div class="col-xs-12 col-sm-4" id="alert">
                    {% include 'admin/common/alert.html' %}
                    <!-- 错误信息form提示 -->
                    {% for field_name, field_errors in loginForm.errors|dictsort if field_errors %}
                        {% for error in field_errors %}
                            <div class="alert alert-danger alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <strong>{{ loginForm[field_name].label }}错误：</strong> {{ error }}
                            </div>
                        {% endfor %}
                    {% endfor %}
                    <!-- 错误信息form提示 end -->
                </div>
            </div>
            <div class="col-xs-12 col-sm-offset-9">
                <div class="col-xs-12 col-sm-5 col-md-4" id="login">
                    <div class="panel panel-primary">
                        <div class="panel-heading">用户登录</div>
                        <div class="panel-body">
                            <form method="post" role="form">
                                {{ loginForm.hidden_tag() }}
                                <div class="login">
                                    <div class="input-group">
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i> </span>
                                        {{ loginForm.email(class="form-control", placeholder="邮 箱",required="", autofocus="") }}
                                    </div>
                                    <div class="input-group">
                                        <span class="input-group-addon" id="basic-addon2"><i class="glyphicon glyphicon-lock"></i> </span>
                                        {{ loginForm.password(class="form-control", placeholder="密 码", required="") }}
                                    </div>
                                    <div class="well-lg">
                                        <div class="row pull-left">
                                            {{ loginForm.remember_me() }} {{ loginForm.remember_me.label(class="small") }}
                                        </div>
                                    </div>
                                    <div class="pull-right">
                                        <input class="btn btn-default" type="reset" value="重 置">
                                        {{ loginForm.submit(class="btn btn-primary") }}
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div><!--/.col-xs-12.col-sm-9-->
        </div><!--/.container-->
    </body>
</html>
